<?php
namespace app\index\controller;
use think\Controller;
use think\Validate;
use think\Db;
use think\Session;
class Openrate extends Sessiond
{  

    public function index(){
     $date['type']=input("param.type");
	 $type=$date['type'];
	  if($type=='1'){
	     $id=input("param.id");
		 $date['find']=Db::name('article')->where("flid",$id)->find();
	  
	  }else{
		  $date['list']=Db::name('ratype')->select();
		  
		  }
	     $this->assign($date);
         return $this->fetch();
	}
   
	
	
}
